<?php
class Mpromotion extends CI_Model{
    public function __construct(){
        parent::__construct();
        $this->load->database();
    }

    public function getPromotionByPos($position){
        $this->db->select(' id, image, link, title, alt, pos, status');
        $this->db->from('promotion');
        $this->db->where('status',1);
        $this->db->where('pos',$position);
        $query = $this->db->get();
        return $query->row_array();
    }
}
?>